// settings.swig
.settings-page {
  margin-top: 20px;
}

.settings-content {

  .tab-pane {
    padding-top: 20px;
  }
}

.email-form {

  .email-address {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
  }

  .email-verification-status {
    font-size: 12px;
    vertical-align: middle;
    font-weight: normal;
    padding: 3px 6px;
  }
}

.team-manage-form {

}

// billing texts
.vertical-spacer {
  margin-bottom: 60px;
}

.billing-stat-wrapper {
}

.billing-stat-text {
  .font-logo;
  font-size: 38px;
  line-height: 1;
  margin-bottom: 16px;

  span {
    font-size: 16px;
    margin-left: 6px;
  }

  &.overdue {
    color: @brand-danger;
  }
}

.billing-stat-text-info {
  color: @gray-light;
  margin-top: -16px;

  span {
    margin-left: 6px;
  }
}

.billing-subheading {
  margin-top: 24px;
  margin-bottom: 6px;
}

.billing-support-class {
  position: relative;
  display: inline-block;
  color: #515151;
  background: #e6e6e6;
  border: 1px solid #717171;
  border-radius: 4px;
  font-size: 20px;
  .font-logo;
  padding: 2px 14px;
  vertical-align: middle;
  overflow: hidden;
  cursor: default;

  + .btn {
    margin-left: 5px;
  }

  &.has-tooltip {
    cursor: pointer;
  }

  &.pro {
    color: @link-color;
    background: #eff8ff;
    border-color: @link-color;
  }

  &.enterprise {
    color: #f39700;
    background: #fff6d8;
    border-color: #f5a623;
  }

  @duration: 1.6s;
  @offset: .05s;
  @hl-before: 40px;
  @hl-after: 120px;

  &:before,
  &:after {
    content: '';
    position: absolute;
    width: 10px;
    height: 60px;
    background: #fff;
    display: block;
    top: 0;
    left: -40px;
    transform: skewX(-24deg);
    mix-blend-mode: overlay;
  }

  &:before {
    width: 5px;
    margin-left: -15px;
    animation: btn-highlight-before @duration cubic-bezier(.4, .41, .04, 1) 0s 1;
  }

  &:after {
    animation: btn-highlight-after (@duration - @offset) cubic-bezier(.4, .41, .04, 1) 0s 1;
  }

  // define states
  .state-before {
    left: calc(100% + 30px);
    width: @hl-before;
    margin-left: -25px;
    transition-delay: @offset;
    transition-duration: @duration - @offset;
  }

  .state-after {
    left: calc(100% + 30px);
    width: @hl-after;
  }

  // hover mode
  // &:hover:before,
  // &:hover:after {
  //   transition: all @duration cubic-bezier(.4, .41, .04, 1);
  // }
  //
  // &:hover:before {
  //   .state-before;
  // }
  //
  // &:hover:after {
  //   .state-after;
  // }

  // animation mode
  @keyframes btn-highlight-before {
    100% {
      .state-before;
    }
  }

  @keyframes btn-highlight-after {
    100% {
      .state-after;
    }
  }
}

.remove-btn {
  color: lighten(@gray-light, 20%);

  &:hover,
  &:focus {
    color: @brand-danger;
  }
}

.user-info-section {
  margin-top: 6px;

  .large {
    font-size: 160%;
    margin-bottom: 2px;
  }

  .medium {
    font-size: 140%;
    opacity: .5;
  }

  .user-info-tier {

    .icon {
      position: relative;
      top: -1px;
      font-size: 20px;
      vertical-align: middle;
    }
  }

  .support-expire-date {
    opacity: .5;
  }

  .cc-func-type,
  .cc-func-name {
    font-family: @font-family-sans-serif;
    font-size: @font-size-base;
  }

  .cc-func-type {
    color: #777;
    text-transform: uppercase;
  }

  .cc-func-type-user {
    color: #ffab11;
    background: #fff8e9;
  }

  .cc-func-type-team {
    color: #009eff;
    background: #ebf7ff;
  }
}

.avatar-settings {
  @s: 100px;
  display: block;
  width: @s;
  height: @s;
  margin: 0 auto;
  margin-top: 6px;
  text-align: center;

  span,
  img {
    display: block;
    width: @s;
    height: @s;
  }
}

.billing-id {
  display: block;
  max-width: 5em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: @font-family-monospace;
}

.billing-status,
.billing-type {

  &.billing-status-billed,
  &.billing-type-1 {
    color: @brand-success;
  }

  &.billing-status-unbilled,
  &.billing-type-2 {
    color: @brand-danger;
  }

  &.billing-status-balanced,
  &.billing-type-3 {
    color: @gray-light;
  }
}

.billing-amount-head {
  width: 80px;
  text-align: right;
}

.billing-amount-col {
  text-align: right;
}

.price-wrap {

  &-billing-details {

    .price-card {
      width: 25%;

      // I use `@screen-xs - 1px` here for smaller break point
      // Tunghsiao, Jan 7, 2015, 7:16 AM
      @media (max-width: (@screen-xs - 1px)) {
        width: 100%;
      }

      > li {

        &.progress {
          width: 80%;
          height: 3px;
          margin: 10px auto 5px;
          box-shadow: none;
          background: #eee;

          .progress-bar {
            line-height: 3px;
            box-shadow: none;
          }
        }

        &.translucent {
          opacity: 1;
          color: @gray-light;

          .cursor-pointer {

            &:hover,
            &:focus {
              color: #000;
            }
          }
        }
      }
    }
  }
}

.billing-amount-total {
  text-align: center;
  background: #fafafa;
  padding: 20px 0;
  margin-top: -20px;
}

.table-wrap {

  &-scrollable {
    overflow-x: scroll;

    table {
      min-width: 640px;

      > tbody > tr > th {
        min-width: 80px;
      }
    }
  }
}

table > tbody > tr > td > .cursor-pointer {
  color: @link-color;
}

// bill_charge.html
.payment-methods {
  margin-bottom: (@line-height-computed / 2);

  .payment-method {
    color: @text-color;
    display: inline-block;
    cursor: pointer;
    vertical-align: top;
    text-decoration: none;
    border-radius: @border-radius-base;

    & + .payment-method {
      margin-left: 5px;
    }

    .payment-method-radio {
      outline: none !important;
      display: none;

      &:checked {

        ~ .payment-method-image,
        ~ .payment-method-text {
          color: @link-color;
          border-color: @input-border-focus;
        }
      }
    }

    .payment-method-image {
      padding: 10px;
      border-radius: @border-radius-base;
      border: 1px solid #ddd;
    }

    .payment-method-text {
      min-width: 110px;
      height: 53px;
      padding: 7px 12px;
      line-height: (53px - 7px * 2);
      text-align: center;
      border-radius: @border-radius-base;
      border: 1px solid #ddd;

      &.has-balance {
        line-height: 1.3;
      }

      .payment-method-credit-balance {
        opacity: .6;
      }

      &[disabled] {
        opacity: .5;
        cursor: not-allowed;
      }
    }

    &:hover,
    &:focus {

      .payment-method-image,
      .payment-method-text {

        &:not([disabled]) {
          border-color: @input-border-focus;
        }
      }
    }

    &:focus {
      appearance: none;
      outline: none;
    }
  }
}

.sticky-note {
  color: #7d5d31;
  padding: 10px;
  border-radius: @border-radius-base;
  border: 1px solid #efecdc;
  background: #fffef8;
  margin-bottom: (@line-height-computed / 2);

  p:last-child {
    margin-bottom: 0;
  }

  &.payment-method-bank-transfer {
    max-width: 350px;
  }
}

.charge-modal {

  .modal-body {
    text-align: center;

    h5 {
      color: @gray-light;
    }

    .billing-stat-wrapper {
      margin-bottom: 30px;
    }

    .billing-stat-text {
      margin-bottom: 0;
    }

    .payment-method-text {
      display: inline-block;
      font-size: 16px;
      padding: 10px 20px;
      border: 1px solid @gray-light;
      border-radius: @border-radius-base;
    }

    .form-group {

      &.last-child {
        margin-bottom: 0;
      }
    }
  }

  .modal-footer {
    text-align: center;
    margin-top: 5px;
  }
}

// bill_general.html
.unpaid-amount {
  font-style: normal;

  &.has-unpaid {
    color: @brand-danger;
  }
}

// bill_invoice.html
.request-invoice-list {

  &.history {

    .invoice-item {
      line-height: 1rem;
    }
  }
}

.invoice-status {

  &.awaiting {
    color: @brand-warning;
  }

  &.approved {
    color: @brand-success;
  }

  &.cancelled {
    color: @gray-light;
  }
}

// invoice_form.html
.modal-invoice-request {

  .modal-body {

  }
}

.invoice-item {
  margin-top: 20px;
  margin-bottom: 20px;

  &:first-child {
    margin-top: 10px;
  }

  &:last-child {
    margin-bottom: 0;
  }

  > label {
    display: block;
  }

  .date {
    color: @gray-light;
    margin-right: 10px;
  }

  .comment {
  }

  .amount {
    float: right;
  }
}

.request-invoice-total-wrap {
  position: relative;

  .request-invoice-total-btns {
    position: absolute;
    bottom: 0;
    right: 0;
  }
}

.request-invoice-total {

  span {
    font-size: 32px;
    .font-logo;
    line-height: 1;
  }
}
